<?php echo form_open('admin/messages/form/'.$id); ?>

<div class="tabbable">
		<fieldset>
			<label for="name">Tên</label>
			<?php
				$data	= array('name'=>'name', 'value'=>set_value('name', $name), 'class'=>'span5');
				echo form_input($data);
			?>
			<label for="slug">Slug</label>
			<?php
				$data	= array('name'=>'slug', 'value'=>set_value('slug', $slug), 'class'=>'span5');
				echo form_input($data);
			?>
			<label for="subject">Chủ đề</label>
			<?php
				$data	= array('name'=>'subject', 'value'=>set_value('subject', $subject), 'class'=>'span5');
				echo form_input($data);
			?>
			<label for="content">Nội dung</label>
			<?php
				$data	= array('id'=>'content','name'=>'content', 'class'=>'editor', 'value'=>set_value('content', $content));
				echo form_textarea($data);
				// echo display_ckeditor($ckeditor);
			?>
			<script type="text/javascript">
					jQuery(function(){
						// jQuery( 'textarea.ckeditor' ).ckeditor();
						CKEDITOR.replace( 'content', {
							filebrowserBrowseUrl: '/browser/browse.php',
							filebrowserUploadUrl: '/uploader/upload.php'
						});
						
					});
				</script>
			<label for="sequence">Thứ tự</label>
			<?php
				$data	= array('name'=>'sequence', 'value'=>set_value('sequence', $sequence), 'class'=>'span5');
				echo form_input($data);
			?>
		</fieldset>
</div>

<div class="form-actions">
	<button type="submit" class="btn btn-primary">Cập nhật</button>
</div>	
</form>